//
//  FBtListController.m
//  JwPack
//
//  Created by 陈警卫 on 2025/7/24.
//

#import "FBtListController.h"
#import "FBtManager.h"
#import "CXBtPeriModel.h"

@interface FBtListController ()

@property (nonatomic, strong) FBtManager *btManager;


@end

@implementation FBtListController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    //[self setupView];
    //[self setupData];
    [self testCXBt];
}

- (void)testCXBt {
    
    CXBtPeriModel *model = [[CXBtPeriModel alloc] init];
    model.timeout = 5;
    [model startTimer];
    
}




- (void)viewDidAppear:(BOOL)animated {
    [super viewDidAppear:animated];
    //[self.btManager scanConnect];
}

- (void)setupData {
    self.btManager = [[FBtManager alloc] init];
    
    /**
     for (NSInteger i = 0; i < 100; i++) {
         [NSThread sleepForTimeInterval:0.01];
         FBtMessageModel *messageModel = [[FBtMessageModel alloc] init];
         messageModel.signal = FBtSig_getWifi;
         [messageModel setupCompleData];
         NSLog(@"%@", messageModel.data);
     }
     */
}

- (void)setupView {
    UIButton *btn1 = [UIButton buttonWithType:(UIButtonTypeCustom)];
    btn1.frame = CGRectMake(20, 100, 100, 30);
    [btn1 setTitle:@"配网" forState:(UIControlStateNormal)];
    [btn1 setTitleColor:[UIColor blackColor] forState:(UIControlStateNormal)];
    btn1.backgroundColor = [UIColor yellowColor];
    [self.view addSubview:btn1];
    kJwWeak(self);
    [btn1 jw_addTargetAction:^(UIButton *button) {
        [self.btManager setNet];
    }];
}


@end
